package com.example.apartment.common;

/**
 * 统一异常
 *
 * @author wuzexin
 * @date 2021/10/28 13:08
 */
public class RespException extends RuntimeException{
    private final Integer code;
    private final String msg;

    public RespException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public RespException(RespExceptionEnum e) {
        this.code = e.getCode();
        this.msg = e.getMsg();
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
